package org.fireflow2.designer.eclipse.parts.tree;

import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.editparts.AbstractTreeEditPart;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.fireflow2.designer.eclipse.Activator;
import org.fireflow2.designer.eclipse.policies.NodeEditPolicy;

public class StartNodeTreePart extends AbstractTreeEditPart {
	private Image img = null;

	public StartNodeTreePart(){
		ImageDescriptor imageDescriptor = ImageDescriptor.createFromFile(Activator.class, "resources/startNode.png");
		img = imageDescriptor.createImage();

	}	
	
    protected void refreshVisuals() {
    	this.setWidgetText("StartNode");
    	this.setWidgetImage(img);
    }	
	@Override
	protected void createEditPolicies() {
		// TODO Auto-generated method stub
      installEditPolicy(EditPolicy.COMPONENT_ROLE, new NodeEditPolicy());
	}     
}
